def is_palindrome(mystr):
    helper = [0] * 128
    for c in mystr:
        if c != ' ':
            helper[ord(c)] += 1
    odd_count = 0
    for num in helper:
        if num & 1 == 1:
            odd_count += 1
        if odd_count > 1:
            return False
    return True


mystr1 = 'ab'
mystr2 = 'abcdcba'
mystr3 = 'ab  cdcb   a'
print(is_palindrome(mystr1))
print(is_palindrome(mystr2))
print(is_palindrome(mystr3))